{include file="./public/static/block/index/head.html"}
{include file="./public/static/block/index/leftNav.html"}
<!--内容部分-->
<div style="height:300px;background-image: url('__IMG__/1-1.png');background-position: center;
background-repeat: no-repeat;background-size: cover;border-bottom: 1px dashed #2BD9F1;" class=""></div>
<div style="min-height: auto;" class="side-content " data-original="">
    <!--分类 搜索-->
    <div class="subnav-box ">
        <ul class="subnav-cut">
            <li class="subnav-bin subnav-search">
                <a href="javascript:;"><b><i class="fa fa-search"></i></b></a>

                <form method="get" action="">
                    <div class="form-group">
                        <div class="input-search">
                            <button type="submit" class="input-search-btn">
                                <i class="icon wb-search" aria-hidden="true"></i></button>
                            <input class="form-control none-border" name="q" value="" placeholder="搜索">
                        </div>
                    </div>
                </form>
            </li>
            <style>
                .w-classify {
                    position: absolute;
                    left: 0;

                    display: none;
                }

                .w-classify ul {
                    margin-top: 1px;
                    height: auto;
                    background: #fff;
                }

                .w-classify ul li {
                    padding: 0 10px;
                }

                .w-classify ul li:hover {
                    background: #00c0ff;
                }

                .w-classify ul li a {
                    padding: 10px 0;
                    display: block;
                    color: #555;
                }

                .w-classify ul li:hover a {
                    color: #fff;
                }
            </style>
            <li class="w-rz" style="position: relative">
                <a class='active' href="javascript:0;"><b>检测</b></a>

                <div style="" class="w-classify">
                    <ul>
                    {volist name='cates' id='cate'}
                        <li><a href="{:get_index('service/detection',['cate_id'=>$cate.cate_id])}">{$cate.name}</a></li>
                    {/volist}
                    </ul>
                </div>
            </li>
            <li class="subnav-bin">
                <a href="{:get_index('service/authentication')}"><b>认证</b></a>
            </li>

        </ul>
    </div>
    <script>
        var _li_h = $('.w-rz').height();
        $('.w-classify').css('top', _li_h + 'px');
        $('.w-rz').hover(function () {
            $('.w-classify').stop().fadeIn();
        }, function () {
            $('.w-classify').stop().fadeOut();
        });
    </script>
    <!--检测详情-->
    <section class="met-shownews animsition">
        <div class="container">
            <div class="row">
                <div style="margin-top: 0;position: relative" class="window-back" data-title="<font color=#333>产品</font>" style="margin-top: 45px;">
                    <div style="position: absolute;top:0;
                    left:0;height:100%;width:100%;" class="padding-box">
                        <div style="padding-top: 0;position: absolute;top:0;
                        left:0;width:100%;height:100%;" class="title-box">

                            <div style="position: absolute;height:100%;top:0;right:0;width:100%;" class="price-ctrl ctrl-box swiper-no-swiping">
                                <var style="left: 0;" class="ctrl-left ctrl-left1"><i class="fa fa-caret-left"></i></var>
                                <var style="  right: 0;" class="ctrl-right ctrl-right1"><i class="fa fa-caret-right"></i></var>
                            </div>
                        </div>
                    </div>
                    <div class="price-box swiper-container-horizontal" style="cursor: grab;">
                        <div class="price-cut">
                        	{volist name='services' id='service'}
                            <div class="price-bin price-bin-detection swiper-slide-active">
                                <a href="javascript:;"
                                   title="">
                                    <p class="">
                                         <img src="{$service.cover|get_uploads}" class="swiper-lazy swiper-lazy-loaded"
                                             title="">
                                        <var>{$service.name}</var>
                                    </p>
                                    <div class="w-detection-details">
                                        <div>
                                            <b class="w-b-h"><i>{$service.desc}</i></b>
                                            <p></p>
                                        </div>
                                        <p class="p-detection-btn">
                                            <i>{$service.price}元/次</i>
                                            <var onclick="a('{$service.product_id}')">预约检测</var>
                                        </p>
                                    </div>
                                </a>
                            </div>
                           {/volist}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <style type="text/css">
        #foot{
            position: fixed;bottom: 0;left: 0;
        }
    </style>
    <script type="text/javascript">
        function a(product_id){
            var obj={'product_id':product_id};
            $.ajax({
                url:'http://ucenter.znc365.com/index.php/auth/isLogin',
                type:'GET',
                async:false,
                data:'',
                success:function(data){
                    if(data.code==200){
                        if(data.data==0){
                            alert('你还没有登录,请先登录!');
                             $('.w-yn-login-mash').fadeIn();
                             $('.w-login').show();
                             $('.pp').val('1');
                        }else if (data.data==1) {
                             $.ajax({
                                url:'http://ucenter.znc365.com/member.php/shop/addOrderByProductId',
                                type:'POST',
                                data:obj,
                                success:function(data){
                                    console.log(data)
                                    if(data.code==200){
                                        window.location.href="http://ucenter.znc365.com/member.php/shop/cartpay?order_no="+data.data;
                                    }else{
                                        alert(data.message);
                                    }
                                },error:function(){
                                    alert("服务器错误,请稍后再试!");
                                }
                            })
                            
                        }
                    }else{
                        alert('获取登录状态失败!')
                    }
                }
            })
        }
        
    </script>
    <!--底部-->
    <div style="height:75px;"></div>
{include file="./public/static/block/index/foot.html"}
